hip.api.net.hipnet

Undocumented in source.

Public Imports

hip.api.net.server
public import hip.api.net.server;
Undocumented in source.

Members

Enums

IPType
enum IPType
Undocumented in source.
MarkedNetReservedTypes
enum MarkedNetReservedTypes

Those are the reserved type IDs that are found in every MarkNetData instance. Since a new instance of this enum is created, the reserved types are written snake-cased. Custom type members will have the exact same name as the type they intend to use.

NetConnectStatus
enum NetConnectStatus

Network module is one which can't be abstracted much. That happens because, by using templates, it is possible to reduce the memory footprint required for sending and getting data. The implementation of sending data without templates would likely require to allocate memory on heap instead of stack.

NetDataType
enum NetDataType

Currently, only binary seems to be relevant. Custom + might be reserved for implementing known formats (such as JSON)

NetID
enum NetID

Those are the NetIDs that your server must implement. Basically, 0 is ought to be a message that the server must interpret While 1 is the broadcast one. The IDs are mostly relevant to WebSockets

NetInterface
enum NetInterface

Currently, tcp is used everywhere and websockets are used on WASM

Interfaces

INetwork
interface INetwork

Implementation currently follows at hip.network

Structs

NetBuffer
struct NetBuffer
Undocumented in source.
NetConnectInfo
struct NetConnectInfo
Undocumented in source.
NetHeader
struct NetHeader

Usage of Alignment(1) can reduce the memory footprint. It also should use a fixed size type since there will be no surprises when running the code via another platform or something like that.

NetIPAddress
struct NetIPAddress
Undocumented in source.

Templates

Attributes
template Attributes(T, string mem)
Undocumented in source.
MarkNetData
template MarkNetData(T...)

Creates a set of types which

NetBinding
template NetBinding(Req, Resp)
Undocumented in source.

Meta